﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Week2EightBall;

namespace EightBallGui
{
    public partial class Form1 : Form
    {
        EightBall eBall;
        
        public Form1()
        {
            InitializeComponent();
            eBall = new EightBall();
            eBall.BallShowingEvent += new BallShowingMessageHandler(eBall_BallShowingEvent);
        }

        void eBall_BallShowingEvent(object sender, EventArgs e)
        {
            txtMessage.Text = eBall.Message;
        }

        private void cmdGo_Click(object sender, EventArgs e)
        {
            eBall.ShakeBall();
        }

        
    }
}
